From 2e0c76e397811837fd119c1298a5606b4ef65be5 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 15 Jul 2022 10:30:18 +0800 Subject: [PATCH] Fix sending button presses if the drop target specified a mouse rectangle * src/xterm.c (x_dnd_send_position): Handle button presses specially, ignoring mouse rectangles. --- src/xterm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index 94fb0bfa1a0..63b625f3837 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -4455,7 +4455,10 @@ x_dnd_send_position (struct frame *f, Window target, int supported, if (target == x_dnd_mouse_rect_target && x_dnd_mouse_rect.width - && x_dnd_mouse_rect.height) + && x_dnd_mouse_rect.height + /* Ignore the mouse rectangle if we're supposed to be sending a + button press instead. */ + && (supported < 5 || !button)) { if (root_x >= x_dnd_mouse_rect.x && root_x < (x_dnd_mouse_rect.x -- 2.30.2